<template>
    <div class="leftAside ">
        <el-row class="tac">
            <el-col :span="24">
                <h5 class="title">后台管理</h5>
                <el-menu
                    class="el-menu-vertical-demo"
                    @open="handleOpen"
                    @close="handleClose"
                    background-color="#545c64"
                    text-color="#fff"
                    :unique-opened='true'
                    active-text-color="#ffd04b">
                    <el-submenu index="1">
                        <template slot="title">
                            <i class="el-icon-location"></i>
                            <span>文章管理</span>
                        </template>
                        <el-menu-item-group>
                            <router-link :to="{name:'发布文章'}">
                                <el-menu-item index="1-1">发布文章</el-menu-item>
                            </router-link>
                            <router-link :to="{name:'文章列表'}">
                                <el-menu-item index="1-2">文章列表</el-menu-item>
                            </router-link>
                            <router-link :to="{name:'我的消息'}">
                                <el-menu-item index="1-2">我的消息</el-menu-item>
                            </router-link>
                            <router-link :to="{name:'上传文件'}">
                                <el-menu-item index="1-2">上传文件</el-menu-item>
                            </router-link>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-menu-item index="2" >
                        <i class="el-icon-menu"></i>
                        <span slot="title">导航二</span>
                    </el-menu-item>
                    <el-menu-item index="3">
                        <i class="el-icon-document"></i>
                        <span slot="title">导航三</span>
                    </el-menu-item>
                    <el-menu-item index="4">
                        <i class="el-icon-setting"></i>
                        <span slot="title">导航四</span>
                    </el-menu-item>
                </el-menu>
            </el-col>
        </el-row>
    </div>
</template>
<script>
  export default {
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      },
      linkTo(tolink){
          this.$router.push({name:tolink});
      }
    },
    mounted(){
        console.log(0);
    }
  }
</script>
<style lang="scss" scoped>
.title{
    line-height: 60px;
    background: rgb(84, 92, 100);
    padding-left: 10px;
    // font-weight: bold;
    color: #fff;
    font-size: 18px;
}
</style>
